package com.sudo.service.admin.service;

import com.sudo.common.utils.PagedGridResult;
import com.sudo.dao.admin.entity.SysServerNode;
import com.sudo.dao.admin.model.bo.SysServerNodeUpdateBO;
import com.sudo.dao.admin.model.bo.SysServerNodeQueryBO;
import com.sudo.dao.admin.model.bo.SysServerNodeSaveBO;
import com.sudo.dao.admin.model.vo.SysServerNodeVO;
import org.springframework.transaction.annotation.Propagation;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;

public interface SysServerNodeService {

    SysServerNode getServerNodeByServer(String server);

    SysServerNode getServerNodeById(Integer id);

    PagedGridResult querySysServerNodeByPage(SysServerNodeQueryBO sysServerNodeQueryBO);

    List<SysServerNode> queryAllServerNodes();

    List<SysServerNodeVO> queryAllServerNodeInfo();

    int saveServerNode(SysServerNodeSaveBO sysServerNodeSaveBO);

    int updateServerNode(SysServerNodeUpdateBO sysServerNodeUpdateBO);

    @Transactional(propagation = Propagation.REQUIRED,rollbackFor = Exception.class)
    int updateServerNodeStatus(String server, String status);

    int deleteAndSaveServerNode(String server);

    int deleteServerNode(Integer id);
}
